import dynamic from 'next/dynamic'

const DynamicComponent = dynamic(() => import('../components/hello'));
const DynamicComponent2 = dynamic(() =>
  import('../components/hello2').then(mod => mod.Hello)
);
const DynamicComponentWithCustomLoading = dynamic(
  () => import('../components/hello2').then(mod=>mod.Hello),
  { loading: () => <p>...加载中...</p> , ssr:false}
)
function Home() {
  return (
    <div>
      <DynamicComponent />
      <DynamicComponent2/>
      <DynamicComponentWithCustomLoading/>
      <p>HOME PAGE is here!</p>
    </div>
  )
}

export default Home
